var x = null;
function recalc() {
    // console.log("true")
    var clientW = document.documentElement.clientWidth;
    if(!clientW) return;
    //根据设计图宽度替换5500
    //display:none的时候,页面渲染动作不生效,导致slidesPerView设置失败.
    x = clientW/5500;
    var mySwiper = new Swiper('.swiper-container', {
        freeMode : true,
        freeModeMomentum : false,
        slidesPerView : x,
    })
}
function initRecalc() {
    recalc();
    var resizeEvt = 'osrientationchange' in window ? 'orientationchange' : 'resize';
    if(!document.addEventListener) return;
    window.addEventListener(resizeEvt, recalc, false);
    document.addEventListener('DOMContentLoaded', recalc, false);
    // console.log(x)
}
initRecalc();